window.onload = function ()
{
    var canvas = document.getElementById('canvas');
    if ( canvas.getContext )
    {
        var context = canvas.getContext('2d'); 
        
        context.fillRect( 0,   0,  20, 20 );
        context.fillRect( 40,  0,  20, 20 );
        context.fillRect( 80,  0,  20, 20 );
        context.fillRect( 120,  0,  20, 20 );
        context.fillRect( 20,  20, 20, 20 );
        context.fillRect( 60,  20, 20, 20 );
        context.fillRect( 100,  20, 20, 20 );
        context.fillRect( 40,  40, 20, 20 );
        context.fillRect( 80,  40, 20, 20 );
        context.fillRect( 60,  60, 20, 20 );
        
    }
}